package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.dto.PasswordEditDTO;
import com.sky.entity.Employee;
import com.sky.result.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * PROJECT_NAME: sky-take-out
 * NAME: EmployeeMapper
 * USER: SHINIAN
 * DATE: 2022/12/12
 * DESCRIPTION : B端-员工信息持久层接口
 */
@Mapper
public interface EmployeeMapper {

    /**
     * 基于员工姓名查询员工信息方法
     *
     * @param username 员工登录信息的用户名称
     * @return 查询到的员工信息（可能为NULL）
     */
    Employee selectEmployeeByUsername(@Param("username") String username);

    Page<Employee> getpage(@Param("dto") EmployeePageQueryDTO dto);

    void insertEmplyee(@Param("employee") Employee employee);

    Employee selectEmployeeById(@Param("id") Long id);

    void updateEmployee(@Param("status") Integer status,@Param("employeeDTO") EmployeeDTO employeeDTO);

    void editPassword(@Param("employee") Employee employee);
}
